// import Index from '../views/Index.vue'

//异步路由
//放在这里的路由, 必须经过权限过滤 才可以访问
export default [
    {
        path: '/index',
        name: 'index',
        component: () => import('../views/Index.vue'),
        // component: Index,
        // component: '../views/Index.vue',
        children:[
          {
            path: '/index/home',
            name: 'home',
            meta: { title:'首页', role: 'home' },
            component: () => import('../views/Index/Home.vue'),
            // component: '../views/Index/Home.vue',
            children:[
              {
                path: '/index/home/a',
                name: 'a',
                meta: { title:'首页', role: 'a' },
                component: () => import('../views/Index/Home/a.vue'),
              },
              {
                path: '/index/home/b',
                name: 'b',
                meta: { title:'首页', role: 'b' },
                component: () => import('../views/Index/Home/b.vue'),
              },
              {
                path: '/index/home/c',
                name: 'c',
                meta: { title:'首页', role: 'c' },
                component: () => import('../views/Index/Home/c.vue'),
              },
            ]
          },
          {
            path: '/index/contact',
            name: 'contact',
            meta: { title:'首页', role: 'contact' },
            component: () => import('../views/Index/Contact.vue'),
          },
          {
            path: '/index/order',
            name: 'order',
            meta: { title:'首页', role: 'order' },
            component: () => import('../views/Index/Order.vue'),
          },
        ] 
    }
]